#include <avr/io.h>
#include "h/delay.h"
#include "h/dim.c"
#include "h/eeprom.c"
#include "h/motors.c"
#include "h/sensors.c"
#include "h/sequences.c"
#include "h/time.c"


int main ( void ) {
	long int i;

	/*inicializace motoru, senzoru a casu */
	init_motors();
	init_sensors();
	init_timer();

	/* vyber barvy tymu */
	// 1 - cervena
	// 2 - modra
	/*TEST THIS!*/
	if ( get_choice() == 1 ) red = 1; //jsem cerveny
	else if ( get_choice() == 2 ) red = 0; //jsem modry

	/*cekani na vytazeni lanka */
	while ( get_start () == 0 ) { led(1); delay(100); led(0); delay(50); }

	/*spusti stopky na 90s */
	start_time();
	sei(); /*povolit preruseni*/

	stgy_simple();

	stop();
	cli();

	return ( 0 );
}
